<?php require_once('Select_town/Connections/connection.php'); ?>
<?php
mysql_select_db($database_connection, $connection);
$query_rs_town = "SELECT * FROM tbl_town ORDER BY town_name ASC";
$rs_town = mysql_query($query_rs_town, $connection) or die(mysql_error());
?>




<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title> BeautyClinic  </title>

    <!-- Linking styles -->
	<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />
    





<!-- Start ------ Select Zone Town Amphur -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
 	$("#town_id").change(function(){
	
		var url = "Select_town/amphur.php?town_id="+$(this).val() ;

		$.getJSON(
				url ,
				function(resp){
					var opt = "<option value='0'>-- อำเภอ --</option>";
					
					for(var i=0;i<resp.length;i++){
						opt += "<option value='"+ resp[i].amphur_id+"'>"+resp[i].amphur_name+"</option>";
					}
					$("#amphur_id").html( opt );
				} 
		);
	});
})
</script>

<script type="text/javascript">
$(function(){
 	$("#amphur_id").change(function(){
	
		var url = "Select_town/tambon.php?amphur_id="+$(this).val() ;

		$.getJSON(
				url ,
				function(resp){
					var opt = "<option value='0'>-- ตำบล --</option>";
					
					for(var i=0;i<resp.length;i++){
						opt += "<option value='"+ resp[i].tambon_id+"'>"+resp[i].tambon_name+"</option>";
					}	
					$("#tambon_id").html( opt );
				} 
		);
	});
})
</script>

<!-- End ------ Select Zone Town Amphur -->


  


 </head>

 
<body> 
 
  

<!-- start signup_bg -->
<div id="signup_bg">

   		 	<!-- Start: page-top Head --> 	<div id="page-top"> </div>		<!-- End: page-top -->   
 
<!-- start container -- จัดกลาง -->
<div class="signup_center_content">

 <br><br>

  				  <center> <h1> สร้างบัญชีใช้งาน   BeautyClinic </h1> </center>  
 
  						<tr>	<td> &nbsp;</td>	</tr>									  
 						<tr>	<td> &nbsp;</td>	</tr>		<br><br>							  
						<!--  start step-holder -->
						<div id="step-holder">
						 
							<div class="step_dark_round_left">&nbsp;</div>
							<div class="step-dark-right">&nbsp;</div>
							<div class="step-no">1</div>
							<div class="step-dark-left"><a href="">ลงชื่อบัญชีการเข้าใช้</a></div>
							<div class="step-dark-right">&nbsp;</div>

							<div class="step-no-off">2</div>
							<div class="step-light-left">ยืนยันการสมัครสมาชิก</div>
							<div class="step-light-right">&nbsp;</div>

							<div class="step-no-off">3</div>
							<div class="step-light-left"><a href="">ยืนยันด้วยสำเนาบัตรประชาชน</a></div>

							<div class="step-light-round">&nbsp;</div>
							<div class="clear"></div>
						</div>
						<!--  end step-holder -->   







		                
<form action="AddRegister.php" name="frmAdd" method="POST"> <!-- start signup-form -->
	<table border="0" cellpadding="0" cellspacing="0"  id="signup-form">
		<tr>
			<th valign="top">Email <font color=red>*</font> </th>
			<td valign="top"><input type="text" name="UsName" id="UsName" class="email" /></td>
 		</tr>
		<tr>
			<th valign="top">Password  <font color=red>*</font> </th>
			<td valign="top"><input type="password" name="password" id="password" class="email" /></td>
 		</tr>
		<tr>
			<th valign="top">Confirm Password  <font color=red>*</font> </th>
			<td valign="top"><input type="password" name="re-pass" id="re-pass" class="email" /></td>
 		</tr>
	</table>
 <hr  width=auto >
	<table border="0"   cellpadding="0" cellspacing="0" id="signup-form" >
		<tr>
			<th valign="top">นามแฝง  <font color=red>*</font>  </th>
			<td valign="top"> <input type="text" name="Name" id="Name" class="name" /></td>
			<td valign="top">
				<div class="error-left"></div>
				<div class="error-inner">ใช้เพื่อแสดงบนเว็บไซต์</div>
			</td>
		</tr>		
		<tr>
			<th valign="top">ชื่อ - นามสกุล <font color=red>*</font> </th>
			<td valign="top"><input type="text" name="add" id="add" class="name" /></td>
			<td></td>
		</tr>		
 		<tr>
			<th valign="top">เพศ  <font color=red>*</font></th>
			<td>	
				<select  name="phone" id="phone" class="sex">
					<option value="ชาย">ชาย</option>
						<option value="หญิง">หญิง</option>
				</select>
			</td>
			<td></td>
		</tr>
		<tr>
			<th valign="middle">ที่อยู่  <font color=red>*</font> </th>
			<td valign="top" colspan="4"><input type="text" name="c_add" id="c_add" class="email" /></td>
		</tr>
		<tr>
			<th valign="middle" for="town_id">จังหวัด  <font color=red>*</font> </th>
			<td valign="top">	
				<select name="town_id" id="town_id" class="town">
					<option value="0">-- เลือกจังหวัด --</option>
						<?php while( $row_rs_town= mysql_fetch_assoc($rs_town) ) : ?>
					<option value="<?php echo $row_rs_town['town_id']?>"><?php echo $row_rs_town['town_name']?></option>
						<?php endwhile ;?>
				</select>
			</td>
		</tr>
		<tr>
			<th valign="middle" for="amphur_id"> อำเภอ  <font color=red>*</font> </th>
			<td valign="top">	
				<select name="amphur_id" id="amphur_id" class="town">
					<option value="0">-- เลือกอำเภอ --</option>
						<?php while( $row_rs_amphur = mysql_fetch_assoc($rs_amphur) ) : ?>
					<option value="<?php echo $row_rs_amphur['amphur_id']?>"><?php echo $row_rs_amphur['amphur_name']?></option>
						<?php endwhile ;?>
				</select>
			</td>
		</tr>
		<tr>
			<th valign="middle" for="tambon_id">ตำบล  <font color=red>*</font> </th>
			<td valign="top">	
				<select name="tambon_id" id="tambon_id" class="town">
					<option value="0">-- เลือกตำบล --</option>
				</select>
			</td>
		</tr>
		<tr>
			<th valign="middle">รหัสไปรษณีย์  <font color=red>*</font> </th>
			<td valign="top"><input type="text" name="c_post" id="c_post" class="tel" /></td>
		</tr>
		<tr>
			<th valign="middle"> เบอร์โทรศัพท์  <font color=red>*</font> </th>
			<td valign="top"><input type="text" name="c_tel" id="c_tel" class="tel" /></td>
		</tr>
		<tr>
			<th valign="top">ท่านรู้จักเว็บไซต์นี้ทาง <font color=red>*</font> </th>
			<td valign="top" colspan="3"><input type="text" name="email" id="email" class="email" /></td>
			<td></td>
		</tr>		
		<tr>	<td></td>	</tr>									  
		<tr>	<td></td>	</tr>									  
		<tr> 
		<td></td>
			<td > <input type="submit" id="form-submit" class="awesome orange large"  value="สร้างบัญชีผู้ใช้งาน" />
					<input type="submit" id="form-submit" class="awesome orange large"  value="ล้างข้อมูล" />
			</td>
		</tr>
	</table> 			
</form>  <!-- end signup-form  --> 
		

 					
</td>
</tr>
</table>

</div>

  
 

</div>
<!--  end container -->

    
</body>
</html>